package org.siam.utils {

	import flash.utils.getDefinitionByName;
	import flash.utils.getQualifiedClassName;
	
	public class ClassUtils {
		
		public static function resolveName(className:String):Class {
			var type:Class = getDefinitionByName(className) as Class;
			return type;
		}
		
		public static function isSubclass(sub:Class, base:Class):Boolean { 
			if (!sub || !base) return false; 
			
			var type:* = new sub();
			return type is base;
		}
		
		public static function getClassName(type:Class):String {
			return getQualifiedClassName(type);
		}
	}
}